package org.jeecg.modules.zcgl.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.entity.ApprovalBaseEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 合同信息
 * @Author: jeecg-boot
 * @Date: 2020-06-20
 * @Version: V1.0
 */
@Data
@TableName("zcgl_lease_contract_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "zcgl_lease_contract_info对象", description = "合同信息")
public class LeaseContractInfo extends ApprovalBaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 合同编号
     */
    @Excel(name = "合同编号", width = 15)
    @ApiModelProperty(value = "合同编号")
    private String contractNum;
    /**
     * 资产名称
     */
    @Excel(name = "资产名称", width = 15, dictTable = "zcgl_asset_info", dicText = "asset_name", dicCode = "id", pullDown = false)
    @Dict(dictTable = "zcgl_asset_info", dicText = "asset_name", dicCode = "id")
    @ApiModelProperty(value = "资产名称")
    private String assetId;

    /**余额*/
    @ApiModelProperty(value = "总余额")
    @Excel(name = "总余额", width = 15)
    private BigDecimal totalBalance;

    /**
     * 出租方
     */
    @Excel(name = "出租方", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id", dicKey ="parent_id='" + CommonConstant.BASE_DEPART_ID + "'")
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
    @ApiModelProperty(value = "出租方")
    private String rentCompanyId;

    /**
     * 资产明细
     */
    @Excel(name = "资产明细", width = 15, dictTable = "zcgl_asset_info_sub", dicText = "room_name", dicCode = "id", pullDown = false)
    @Dict(dictTable = "zcgl_asset_info_sub", dicText = "room_name", dicCode = "id")
    @ApiModelProperty(value = "资产明细")
    private String assetSubIds;
    /**
     * 客户名称
     */
    @Excel(name = "客户名称", width = 15, dictTable = "zcgl_customer_info", dicText = "CONCAT_WS( ';', `name`, phone )", dicCode = "id", pullDown = false)
    @Dict(dictTable = "zcgl_customer_info", dicText = "CONCAT_WS( ' ', `name`, phone )", dicCode = "id")
    @ApiModelProperty(value = "客户名称")
    private String customerId;
    /**
     * 打印模版
     */
    @Excel(name = "打印模版", width = 15, dictTable = "sys_sms_template", dicText = "template_name", dicCode = "id", dicKey = "template_code='houses_rental_contract'")
    @Dict(dictTable = "sys_sms_template", dicText = "template_name", dicCode = "id")
    @ApiModelProperty(value = "打印模版")
    private String printTemplateId;

    /**
     * 合同类型
     */
    @Excel(name = "合同类型", width = 15, dicCode = "zcgl_contract_type")
    @Dict(dicCode = "zcgl_contract_type")
    @ApiModelProperty(value = "合同类型")
    private Integer type;

    /**
     * 缴费方式：1：固定计费，2：灵活计费
     */
    @Excel(name = "计费方式", width = 15, dicCode = "zcgl_contract_charge_type")
    @Dict(dicCode = "zcgl_contract_charge_type")
    @ApiModelProperty(value = "计费方式：1：固定计费，2：灵活计费")
    private Integer chargeType;
//    /**
//     * 合同模版
//     */
//    @Excel(name = "合同模版", width = 15, dictTable = "sys_sms_template", dicCode = "id", dicText = "template_name")
//    @Dict(dictTable = "sys_sms_template", dicCode = "id", dicText = "template_name")
//    @ApiModelProperty(value = "合同模版")
//    private String contractTemplate;

    /**
     * 合同状态
     */
    @Excel(name = "合同状态", width = 15, dicCode = "zcgl_contract_status")
    @Dict(dicCode = "zcgl_contract_status")
    @ApiModelProperty(value = "合同状态")
    private Integer status;
    /**
     * 经营业态
     */
    @Excel(name = "经营业态", width = 15/*, dicCode = "zcgl_manage_status"*/)
//	@Dict(dicCode = "zcgl_manage_status")
    @ApiModelProperty(value = "经营业态")
    private String manageStatus;
    /**
     * 商户名称
     */
    @Excel(name = "商户名称", width = 15)
    @ApiModelProperty(value = "商户名称")
    private String merchantName;
    /**
     * 出租面积
     */
    @Excel(name = "出租面积", width = 15)
    @ApiModelProperty(value = "出租面积")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal rentableArea;
    /**
     * 租金单价
     */
    @Excel(name = "租金单价", width = 15)
    @ApiModelProperty(value = "租金单价")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal rentPrice;
    /**
     * 月租金
     */
    @Excel(name = "月租金", width = 15)
    @ApiModelProperty(value = "月租金")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal monthlyRent;
    /**
     * 保证金
     */
    @Excel(name = "保证金", width = 15)
    @ApiModelProperty(value = "保证金")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal cashDeposit;
    /**
     * 违约金
     */
    @Excel(name = "违约金", width = 15)
    @ApiModelProperty(value = "违约金")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal liquidatedDamages;
    /**
     * 合同租金浮动比例
     */
    @Excel(name = "合同租金浮动比例", width = 15)
    @ApiModelProperty(value = "合同租金浮动比例")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal contractChangeRatio;
    /**
     * 租金支付方式
     */
    @Excel(name = "租金支付方式", width = 15, dicCode = "zcgl_lease_contract_paymenttype")
    @Dict(dicCode = "zcgl_lease_contract_paymenttype")
    @ApiModelProperty(value = "租金支付方式")
    private Integer modeOfPayment;
    /**
     * 起租时间
     */
    @Excel(name = "起租时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "起租时间")
    private Date rentStartTime;
    /**
     * 到租时间
     */
    @Excel(name = "到租时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "到租时间")
    private Date rentEndTime;

    /**
     * 免租月数（月）
     */
    @Excel(name = "免租月数（月）", width = 15)
    @ApiModelProperty(value = "免租月数（月）")
    private String rentHolidayDay;

    /**
     * 免租开始日期
     */
    @Excel(name = "免租开始日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "免租开始日期")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date rentHolidayStart;
    /**
     * 免租结束日期
     */
    @Excel(name = "免租结束日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "免租结束日期")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date rentHolidayEnd;
    /**
     * 签约日期
     */
    @Excel(name = "签约日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "签约日期")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date signingDate;
    /**
     * 合同期限
     */
    @Excel(name = "合同期限", width = 15)
    @ApiModelProperty(value = "合同期限")
    private String contractPeriod;
    /**
     * 租赁期限
     */
//	@Excel(name = "租赁期限", width = 15)
//    @ApiModelProperty(value = "租赁期限")
    private String termOfLease;
    /**
     * 附件
     */
    @Excel(name = "附件", width = 15)
    @ApiModelProperty(value = "附件")
    private String accessory;
    /**
     * 补充条款
     */
    @Excel(name = "补充条款", width = 15)
    @ApiModelProperty(value = "补充条款")
    private String supplementaryTerms;

    /**
     * 提前缴费天数（天）
     */
    @Excel(name = "提前缴费天数（天）", width = 15)
    @ApiModelProperty(value = "提前缴费天数（天）")
    private Integer beforeDay;

    /**
     * 是否发送到期提醒
     */
//    @Excel(name = "是否发送到期提醒", width = 15)
    @ApiModelProperty(value = "是否发送到期提醒")
    private Integer izExpirationReminder;

    /**
     * 是否生成完成
     */
    @ApiModelProperty(value = "是否生成完成")
    private Integer izGenerateComplete;

    /**
     * 下次生成缴费信息日期
     */
//    @Excel(name = "下次生成缴费信息日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "下次生成缴费信息日期")
    private Date nextRentStartTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "下次生成缴费开始日期")
    private Date nextStartDate;

}
